
package com.saturday.uid.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(
        prefix = "saturday.uid.allocate"
)
@Data
public class BitsAllocatorProperties {

    /**
     * 时间增量最大可用字节数
     */
    private int timeBits = 31;

    /**
     * 机器id最大可用字节数
     */
    private int workerBits = 23;

    /**
     * 每秒并发序列最大可用字节数
     */
    private int seqBits = 9;

    public int getTimeBits() {
        return timeBits;
    }

    public void setTimeBits(int timeBits) {
        this.timeBits = timeBits;
    }

    public int getWorkerBits() {
        return workerBits;
    }

    public void setWorkerBits(int workerBits) {
        this.workerBits = workerBits;
    }

    public int getSeqBits() {
        return seqBits;
    }

    public void setSeqBits(int seqBits) {
        this.seqBits = seqBits;
    }
}
